{% extends "layout-settings.html" %}
{% set active_page = "settings" %}
{% set active_settings = "diagnostic" %}
{% set help_page = ["https://kizniche.github.io/Mycodo/Configuration-Settings/#diagnostic-settings", dict_translation['settings']['title'] + ': ' + dict_translation['diagnostic']['title']] %}

{% block title %} - {{dict_translation['settings']['title'] + ': ' + dict_translation['diagnostic']['title']}}{% endblock %}

{% block settings %}
  <!-- Route: /settings/diagnostic -->
  <div class="container">
    <h3 style="text-align: right; padding-bottom: 1.3em;"><a href="https://kizniche.github.io/Mycodo/Configuration-Settings/#diagnostic-settings" target="_blank"><span style="font-size: 16px" class="fas fa-question-circle"></span></a> {{_('Diagnostics')}}</h3>

    <form class="form-horizontal" method="post" action="/settings/diagnostic">
      <input type="hidden" name="form-name" value="Pi">
      {{form_settings_diagnostic.csrf_token}}

      <div class="row">
        <div class="col-12">
          {{form_settings_diagnostic.delete_dashboard_elements(class_='btn btn-primary', **{'onclick':'return confirm("Are you sure you want to delete this?")'})}}
        </div>
      </div>
      <div class="row mt-3">
        <div class="col-12">
          {{form_settings_diagnostic.delete_inputs(class_='btn btn-primary', **{'onclick':'return confirm("Are you sure you want to delete this?")'})}}
        </div>
      </div>
      <div class="row mt-3">
        <div class="col-12">
          {{form_settings_diagnostic.delete_notes_tags(class_='btn btn-primary', **{'onclick':'return confirm("Are you sure you want to delete this?")'})}}
        </div>
      </div>
      <div class="row mt-3">
        <div class="col-12">
          {{form_settings_diagnostic.delete_outputs(class_='btn btn-primary', **{'onclick':'return confirm("Are you sure you want to delete this?")'})}}
        </div>
      </div>
      <div class="row mt-3">
        <div class="col-12">
          {{form_settings_diagnostic.delete_settings_database(class_='btn btn-primary', **{'onclick':'return confirm("Are you sure you want to delete this?")'})}}
        </div>
      </div>
      <div class="row mt-3">
        <div class="col-12">
          {{form_settings_diagnostic.delete_file_dependency(class_='btn btn-primary', **{'onclick':'return confirm("Are you sure you want to delete this?")'})}}
        </div>
      </div>
      <div class="row mt-3">
        <div class="col-12">
          {{form_settings_diagnostic.delete_file_upgrade(class_='btn btn-primary', **{'onclick':'return confirm("Are you sure you want to delete this?")'})}}
        </div>
      </div>
      <div class="row mt-3">
        <div class="col-12">
          {{form_settings_diagnostic.recreate_influxdb_db_1(class_='btn btn-primary', **{'onclick':'return confirm("Are you sure you want to do this?")'})}}
        </div>
      </div>
      <div class="row mt-3">
        <div class="col-12">
          {{form_settings_diagnostic.recreate_influxdb_db_2(class_='btn btn-primary', **{'onclick':'return confirm("Are you sure you want to do this?")'})}}
        </div>
      </div>
      <div class="row mt-3">
        <div class="col-12">
          {{form_settings_diagnostic.reset_email_counter(class_='btn btn-primary', **{'onclick':'return confirm("Are you sure you want to do this?")'})}}
        </div>
      </div>
      <div class="row mt-3">
        <div class="col-12">
          {{form_settings_diagnostic.install_dependencies(class_='btn btn-primary', **{'onclick':'return confirm("Are you sure you want to do this?")'})}}
        </div>
      </div>
      <div class="row mt-3">
        <div class="col-12">
          {{form_settings_diagnostic.regenerate_widget_html(class_='btn btn-primary', **{'onclick':'return confirm("Are you sure you want to do this?")'})}}
        </div>
      </div>
      <div class="row mt-3">
        <div class="col-12">
          {{form_settings_diagnostic.upgrade_master(class_='btn btn-primary', **{'onclick':'return confirm("Are you sure you want to do this?")'})}}
        </div>
      </div>

    </form>

  </div>

{% endblock %}
